package com.sw.service;

import com.github.pagehelper.PageInfo;
import com.sw.domain.OriginatorPage;
import com.sw.mapper.OriginatorMapper;
import com.sw.model.Active;
import com.sw.model.Originator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/8/5.
 */
@Service
public class OriginatorService {
    public OriginatorPage setOriginatorPage(List<Originator> originatorList){
        OriginatorPage OriginatorPage=new OriginatorPage();
        OriginatorPage.setOriginatorList(originatorList);
        PageInfo<Originator> pageInfo=new PageInfo<Originator>(originatorList);
        OriginatorPage.setPageCount(pageInfo.getPages());
        return OriginatorPage;
    }
}
